const QueryDecoratorFactory = (url:string):MethodDecorator => {
    return (target:Object, propertyKey:string | symbol,descriptor:PropertyDescriptor) => {
        const method = descriptor.value;
        new Promise<any[]>((resolve, reject) => {
            setTimeout(() => {
                resolve([{name:"后盾人"},{name:"houdunren"}])
            },2000)
        }).then(users => {
            method(users);
        })
    }
}

class User{
    @QueryDecoratorFactory('https://xia.com')
    public all(users:any[]){
        console.log(users);
    }
}

new User().all(['后盾人'])